package com.jsoft.service.impl;

import com.jsoft.dao.TicketOpenDao;
import com.jsoft.dao.impl.TicketOpenDaoImpl;
import com.jsoft.entity.TicketOpen;
import com.jsoft.service.TicketOpenService;

/**
 * 开单表的服务层的实现类
 * @author snkstart
 * @create 2023-02-21 20:29
 */
public class TicketOpenServiceImpl implements TicketOpenService {

    private TicketOpenDao ticketOpenDao = new TicketOpenDaoImpl();

    @Override
    public boolean saveTicketOpen(TicketOpen ticketOpen) {
        boolean flag = true;
        int save = 0;
        try {
            save = ticketOpenDao.save(ticketOpen);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (save > 1) {
            flag = true;
        } else {
            flag = false;
        }
        return flag;

    }
}
